Skip to content

Instantly share code, notes, and snippets.

@am17an
am17an / mtp-bench.py
Last active June 7, 2026 22:23
MTP benchmark
#!/usr/bin/env python3
import argparse, json, sys, time
from urllib import request
PROMPTS = [
{"name": "code_python", "prompt": "Write a Python function that returns the n-th Fibonacci number using memoization. Include a docstring."},
{"name": "code_cpp", "prompt": "Write a C++ template function `clamp(x, lo, hi)` that returns x clamped to [lo, hi]. No std::clamp."},
{"name": "explain_concept", "prompt": "Explain how speculative decoding works in large language model inference, in three short paragraphs."},
{"name": "summarize", "prompt": "Summarize in two sentences: The Industrial Revolution began in Britain in the late 18th century, transforming manufacturing through mechanization, steam power, and the factory system. It spread to continental Europe and North America during the 19th century."},
{"name": "qa_factual", "prompt": "Q: What are the four fundamental forces of physics?\nA:"},
@cafce25
cafce25 / index.html
Last active June 7, 2026 22:20
Slowly rotating conic gradient
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Like a record baby!</title>
<style>
:root {
--diagonal: calc(sqrt(2) * max(100vw, 100vh));

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@dabit3
dabit3 / pi_tutorial.md
Last active June 7, 2026 22:20
How to Build a Custom Agent Framework with PI: The Agent Stack Powering OpenClaw

PI is a TypeScript toolkit for building AI agents. It's a monorepo of packages that layer on top of each other: pi-ai handles LLM communication across providers, pi-agent-core adds the agent loop with tool calling, pi-coding-agent gives you a full coding agent with built-in tools, session persistence, and extensibility, and pi-tui provides a terminal UI for building CLI interfaces.

These are the same packages that power OpenClaw. This guide walks through each layer, progressively building up to a fully featured coding assistant with a terminal UI, session persistence, and custom tools.

By understanding how to compose these layers, you can build production-grade agentic software on your own terms, without being locked into a specific abstraction.

Pi was created by @badlogicgames. This is a great writeup from him that explains some of the design decisions made when creating it.

The stack

@tiffany352
tiffany352 / SynthWave 84.json
Created September 6, 2020 19:58
I ported the SynthWave 84 color scheme to work in the Windows Terminal
{
"name": "SynthWave 84",
"background": "#262335",
"foreground": "#ffffff",
"white": "#ffffff",
"brightWhite": "#ffffff",
"black": "#000000",
"brightBlack": "#888888",
"blue": "#03edf9",
"brightBlue": "#03edf9",
@ParthAsopa
ParthAsopa / README.md
Last active June 7, 2026 22:09
Automated Gmail Inbox Sweeper using Gemini AI & Google Apps Script

🧹 Gmail AI Sweeper

An automated backend script that connects Google Apps Script to the Gemini AI API to clean out expired events, webinars, and hackathons from your inbox.

How it works:

  1. Wakes up every 4 hours via a time-driven trigger.
  2. Pulls up to 25 unread emails from your inbox.
  3. Evaluates them against strict rules using Gemini 3.1 Flash Lite.
  4. Safely trashes emails if the event deadline has passed.
  5. Logs all AI verdicts and actions to a Google Sheet dashboard.
@oldnomad
oldnomad / rustore.md
Created October 21, 2024 18:37
RuStore API

RuStore API for application installation

  • URL for human-readable application info page has format https://www.rustore.ru/catalog/app/{packageName}.
  • Application info as a JSON object is available at URL https://backapi.rustore.ru/applicationData/overallInfo/{packageName}.
  • APK reference URL is https://backapi.rustore.ru/applicationData/download-link. It accepts only POST requests (see below).

Application info

Application info JSON object has following fields:

  • code: contains string OK (on success).
@ngoc-minh-do
ngoc-minh-do / Proxmox-install-Nvidia-driver.md
Last active June 7, 2026 22:05
Install Nvidia driver on Proxmox

Install NVIDIA Driver on Proxmox with Secure Boot

This guide walks you through installing the NVIDIA driver on Proxmox with Secure Boot enabled, including automatic signing of DKMS modules and troubleshooting tips.


1. Check Secure Boot Status

mokutil --sb-state